<layout name='Layout/layout_page' />
    <ol class="breadcrumb">
        <li><a href="<{:U('Events/index')}>"><{:L('_menu_events')}></a></li>
        <li class="active"><{:L(_public_list)}></li>
    </ol>
    
    <form class="form-inline" method="get" action="index.php">
        <div class="form-group">
            <label>Keywords</label>
            <input type="text" class="form-control input-sm" name="keyword" value="<{$keyword}>">
        </div>
        <button type="submit" class="btn btn-default btn-sm"><{:L('_public_search')}></button>
        <input type="hidden" name="m" value="Admin" />
        <input type="hidden" name="c" value="Events" />
        <input type="hidden" name="a" value="index" />
    </form>

    <p></p>
    
    <form id="ajaxForm" method="post" action="<{:U('Events/del')}>" name="form1" class="form-horizontal form-validata">
    <TABLE class="table table-striped table-bordered table-hover">
      <THEAD>
        <tr>
          <TH><input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> <{:L("_public_select")}></TH>
          <TH>id</TH>
          <TH>Title</TH>
          <TH>Date</TH>
          <TH>Time</TH>
          <TH>Only member</TH>
          <TH>Action</TH>
        </tr>
      </THEAD>
      <TBODY>             
            <volist name="list" id="vo">
            <tr>
              <td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>" id="<{$vo.id}>"></td>
              <td><{$vo.id}></td>
              <td><a href="<{:U('Events/edit' , array('id'=>$vo['id']))}>" title="<{$vo.title}>"><{$vo.title}></a></td>
              <td><{$vo.date|date='Y-m-d',###}></td>
              <td><{$vo.time}></td>
              <td>
              <eq name="vo.onlyMember" value="1">Yes<else/>No</eq>
              </td>
              <td>
                <a href="<{:U('Events/edit' , array('id'=>$vo['id']))}>" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit"></i> <{:L("_public_edit")}></a>
                <a class="btn btn-default btn-sm" href="<{:U('Events/sign' , array('eventID'=>$vo['id']))}>"><i class="glyphicon glyphicon-user"></i> Sign up</a>
              </td>
            </tr>
            </volist>
      </TBODY>
    </TABLE>

    <div class="row">
        <div class="col-md-6">
            <button class="btn btn-info btn-sm" onClick="if(!confirm('Cannot be recovered after deletion!'))return false;"><i class="glyphicon glyphicon-trash"></i> Delete selected message</button>
        </div>
        
        <div class="col-md-6">
            <div class="page">
                <nav>
                    <ul class="pagination"><{$page}></ul>
                </nav>
            </div>
        </div>
    </div>
    </form>

<script type="text/javascript">
$("#path").val("<{$path}>");
</script>

<input type="hidden" id="menu_action" value="events" />